home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
BBS in a Box 7
/
BBS in a Box - Macintosh - Volume VII (BBS in a Box) (January 1993).iso
/
Files
/
Tele
/
C
/
Comet2.1.3.cpt
/
include
/
ft.h
< prev
next >
Wrap
Text File
|
1991-06-20
|
2KB
|
68 lines
/*
* COPYRIGHT 1987 CORNELL UNIVERSITY; All Rights Reserved
* Please see detailed copyrights and disclaimers in "notice.h"
*/
#ifndef _FTDEF
#define _FTDEF
/* constants & variables used by file transfer routines */
#define C19FTLEN 150 /* upload packet size */
#define TBUFLEN C19FTLEN + C19FTLEN/7 + 10 /* 150 + 23 + 10 = 183 to expand upload packet*/
#define TNFTLEN 2000
#define MAXLEN 4090
#define DOSLEN 1024
#define ESC_CHAR 0x7e
#define PROGVERS 20
#define NUMESC 7
/* bits used in host negotiation */
#define REP 0x01
#define CONV 0x02
#define LOOKUP 0x04
/* codes received from host */
#define FT3270 0x08 /* 1st byte of packet: normal processing */
#define SHUTDOWN 0x09 /* 1st byte indicates host is all done */
#define DOWNLOAD 0x08 /* 2nd byte... */
#define DOWNEOF 0x09
#define UPLOAD 0x0a
#define REXMIT 0x0b
/* codes sent to host are 3270 AID bytes */
/* ENTER ACK OK */
/* PA1 user halt request */
/* PA2 eof on upload */
/* PA3 request re-xmit */
/* PF1 negotiation errors */
/* PF6 write error */
/* PF9 can't interpret packet */
/* PF10 pc immediately quits (abnormal) */
#define FILERCV 0x01 /* xfer file from host to pc */
#define FTASCII 0x02 /* perform ebcdic/ascii conversion */
#define NEGO 0x04 /* negotiation done */
#define DONE 0x08 /* we expect to be closed by host */
#define FEOF 0x10 /* end of file */
#define HALT 0x20 /* user halt pressed */
#define NOSTRIP 0x40 /* do not perform 8 for 7 conversion */
#define C19 0x80 /* running C19 */
/* ftc19 packet structure used for upload & download */
struct ftc19_pkt {
unsigned pkt_len; /* total number of bytes to be uploaded */
unsigned len; /* length of downloaded data */
unsigned chk; /* chksum of downloaded */
unsigned char lbuff[4]; /* length characters xmitted */
unsigned char cbuff[4]; /* chksum characters xmitted */
unsigned char *data; /* xfer data buffer */
};
#endif
unsigned long free_sp(); /* ask OS for am't of disk free space */